﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using BUS;
using System.Windows.Forms;
using DTO;

namespace GiaoDien
{
    public partial class ManHinhChinh : Form
    {
        public ManHinhChinh()
        {
            InitializeComponent();
        }

        private void SachThemXoaSuatoolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FormThongTinSach();
            frm.ShowDialog();
        }

        private void NVThemXoaSuatoolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FormHoSoNhanVien();
            frm.ShowDialog();
        }

        private void MuonSachtoolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FormMuonSach();
            frm.ShowDialog();
        }

        private void TraSachtoolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FormTraSach();
            frm.ShowDialog();
        }

        private void MatSachtoolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FormGhiNhanMatSach();
            frm.ShowDialog();
        }

        private void TraCuuSachtoolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FormTraCuuSach();
            frm.ShowDialog();
        }

        private void ThanhLySachtoolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FormThanhLySach();
            frm.ShowDialog();
        }

        private void SachImporttoolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new ImportSach();
            frm.ShowDialog();
        }

        private void SachExporttoolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new ExportSach();
            frm.ShowDialog();
        }

        private void DGThemXoaSuatoolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FormTheDocGia();
            frm.ShowDialog();
        }

        private void DGImporttoolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new ImportDocGia();
            frm.ShowDialog();
        }

        private void DGExporttoolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new ExportDocGia();
            frm.ShowDialog();
        }

        private void quyĐịnhToolStripMenuItem_Click(object sender, EventArgs e)
        {
            
        }

        private void bộPhậnToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Form frm = new FormBoPhan();
            frm.ShowDialog();
        }

        private void bằngCấpToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FormBangCap();
            frm.ShowDialog();
        }

        private void chứcVụToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FormChucVu();
            frm.ShowDialog();
        }

        private void loạiĐộcGiảToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FormLoaiDocGia();
            frm.ShowDialog();
        }

        private void BCMuonSachtoolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new BaoCaoThongKeTinhHinhMuonSachTheoTheLoai();
            frm.ShowDialog();
        }

        private void BCSachTraTretoolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new BaoCaoThongKeSachTraTre();
            frm.ShowDialog();
        }

        private void BCTienNotoolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new BaoCaoThongKeDocGiaNoTienPhat();
            frm.ShowDialog();
        }



        public static string manhanvien { get; set; }

        private void saoLưuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            BACKUPBUS bkBUS = new BACKUPBUS();
            bool kq = bkBUS.backup();
            if (kq == true)
                MessageBox.Show("Backup thành công");
            else
                MessageBox.Show("Backup thất bại");
        }

        private void khôiPhụcToolStripMenuItem_Click(object sender, EventArgs e)
        {
            RESTOREBUS rtBUS = new RESTOREBUS();
            bool kq = rtBUS.restoredatabase();
            if (kq == true)
                MessageBox.Show("Restore thành công");
            else
                MessageBox.Show("Restore thất bại");
        }

        private void ManHinhChinh_Load(object sender, EventArgs e)
        {
            Form frm = new FormDangNhap();
            frm.ShowDialog();
            if (manhanvien == "")
                Application.Exit();
        }
        private void QDsáchToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            Form frm = new FormQuyDinhSach();
            frm.ShowDialog();
        }

        private void ngônNgữToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FormNgonNgu();
            frm.ShowDialog();
        }

        private void thẻLoạiSáchToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FormTheLoaiSach();
            frm.ShowDialog();
        }

        private void TinhTrangNVToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FormTinhTrangNhanVien();
            frm.ShowDialog();
        }
        private void nhàXuấtBảnToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form frm = new FormTinhTrangNhanVien();
            frm.ShowDialog();
        }

        private void tìnhTrạngToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void dữLiệuToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void DocGiatoolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void closeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Close();
        }



        
    }
}
